<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="station.title"/></title>       
</head>

<body id="station"/>

<spring:bind path="station.*">
    <c:if test="${not empty status.errorMessages}">
    <div class="error">    
        <c:forEach var="error" items="${status.errorMessages}">
            <img src="<c:url value="/images/iconWarning.gif"/>"
                alt="<fmt:message key="icon.warning"/>" class="icon" />
            <c:out value="${error}" escapeXml="false"/><br />
        </c:forEach>
    </div>
    </c:if>
</spring:bind>

<div class="separator"></div>

<form:form commandName="station" method="post" action="station" onsubmit="return validateStation(this)" id="stationForm">
<ul>
    <li class="info">
        <fmt:message key="station.message"/>
    </li>
    <li>
        <appfuse:label styleClass="desc" key="station.name"/>
        <form:errors path="name" cssClass="fieldError"/>
        <form:input path="name" id="name" cssClass="text large" cssErrorClass="text large error"/>
    </li>    
    <li>
        <appfuse:label styleClass="desc" key="station.description"/>
        <form:errors path="description" cssClass="fieldError"/>
        <form:input path="description" id="description" cssClass="text large" cssErrorClass="text large error"/>
    </li> 
    <li class="buttonBar bottom">
        <input type="submit" class="button" name="save" onclick="bCancel=false" value="<fmt:message key="button.add"/>"/>
        <input type="submit" class="button" name="cancel" onclick="bCancel=true" value="<fmt:message key="button.cancel"/>"/>
    </li>
</ul>
</form:form>

<script type="text/javascript">
    Form.focusFirstElement($('stationForm'));
    highlightFormElements();
</script>

<v:javascript formName="user" staticJavascript="false"/>
<script type="text/javascript" src="<c:url value="/scripts/validator.jsp"/>"></script>


